package com.lcf.feign.service.system;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 描述：文件feign
 *
 * @author lcf
 * @since 2025/3/4 20:09
 */
@FeignClient(name = "${system-service-name}", contextId = "file", url = "${system-service-url}", path = "feign/file")
public interface SysFileFeignService {
    /**
     * 根据相对路径获取绝对路径
     */
    @GetMapping("absoluteUrl")
    String getAbsoluteUrl(@RequestParam String filePath);

    /**
     * 根据相对路径获取绝对路径
     */
    @PostMapping("absoluteUrlMap")
    Map<String, String> getAbsoluteUrlMap(@RequestBody List<String> filePath);
}
